def readfile(filename):
    '''Read and print file contents'''
    file_name=filename
    try:
        with open(file_name) as f:
            contents=f.read()
    except FileNotFoundError:
        pass
    else:
        print(contents)

readfile('D:\\GITEE\\study_code\\Python\\2022-11-14\\dogs.txt')
readfile("cats.txt")

